package com.mjkj.demo.utils;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import java.util.List;

/**
 * @author XuDoom
 * @version 1.0
 * @date 2024/1/9 16:36
 */
public class PageUtil {

    public static <K,T> Page<T> getVoPage(Page<K> page, List<T> records) {
        Page<T> voPage = new Page<>();
        BeanUtil.copyProperties(page, voPage, "records");
        voPage.setRecords(records);
        return voPage;
    }

}
